﻿package mortal.game.view.closedBetaGiftBag
{
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class ClosedBetaGiftBagIcon extends ActionBaseIcon
    {
        private static var _instance:ClosedBetaGiftBagIcon;

        public function ClosedBetaGiftBagIcon(param1:String)
        {
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            disEventName = EventName.ClosedBetaGiftBagShow;
            this.name = "ClosedBetaGiftBagIcon";
            return;
        }// end function

        override public function playEffect(param1:String = "ActionIconEffect.swf") : void
        {
            super.playEffect(param1);
            if (!GameController.autoGuide.hasGuideFCFL())
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.AutoGuideActiveByEvent, {mainId:46, stepId:1}));
            }
            return;
        }// end function

        override public function get width() : Number
        {
            return 56;
        }// end function

        override public function get height() : Number
        {
            return 54;
        }// end function

        public static function get instance() : ClosedBetaGiftBagIcon
        {
            if (!_instance)
            {
                _instance = new ClosedBetaGiftBagIcon(ResFileConst.AgencyWelfareIcon);
            }
            return _instance;
        }// end function

        public static function get hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
